Tests: Add comprehensive tests for WP_HTML_Decoder.#10810
Tests: Add comprehensive tests for WP_HTML_Decoder.#10810huzaifaalmesbah wants to merge 7 commits intoWordPress:trunkfrom
Conversation
Adds unit tests to cover named entities, numeric entities, and edge cases in WP_HTML_Decoder, achieving 100% code coverage. See #64225.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Aligns array keys in data_invalid_numeric_references to comply with WordPress double arrow alignment standards.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Aligns array keys in data_ambiguous_ampersands to fully comply with WordPress double arrow alignment standards.
Ticket: https://core.trac.wordpress.org/ticket/64225
Adds unit tests to cover named entities, numeric entities, and edge cases in
WP_HTML_Decoder, achieving 100% code coverage.Changes:
test_decode_attribute_decodes_named_entitiesfor standard named entities.test_decode_attribute_decodes_hex_numeric_entitiesandtest_decode_attribute_decodes_decimal_numeric_entities.test_decodes_windows_1252_mapped_charactersto verify C1 control mappings.test_decodes_ambiguous_ampersandsfor context-specific behavior.Testing:
Run
npm run test:php -- --group html-apito verify. All tests pass.